﻿using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using Core.DataAccess.IRepositories;
using Core.BusinessLogic.Interfaces;
using Core.DataAccess;
using Core.Common;

namespace Core.BusinessLogic
{
    [Export(typeof(IFriendService))]
    public class FriendService : IFriendService
    {
        [Import]
        private IFriendRepository _friendRepository;
        //[Import]
        //private IAccountRepository _accountRepository;

        public FriendService()
        {
            MEFManager.Compose(this);
        }

        public List<Friend> GetFriendsByAccountID(Int32 accountID)
        {
            return _friendRepository.GetFriendsByAccountID(accountID);
        }

        public List<FriendsProfile> GetFriendsAccountByAccountID(Int32 accountID)
        {
            return _friendRepository.GetFriendsAccountByAccountID(accountID);
        }

        public void AddFriendByAccountID(Friend friend)
        {
            _friendRepository.AddFriendByAccountID(friend);
        }

        public void DeleteFriendByAccountID(int accountID, int friendID)
        {
            _friendRepository.DeleteFriendByAccountID(accountID, friendID);
        }
    }
}
